\hypertarget{class_exercise}{
\section{Exercise Class Reference}
\label{class_exercise}\index{Exercise@{Exercise}}
}


Interface pattern for the exercises with some default method implemented. To create an exercise class, inherate from this class and simply overload the \hyperlink{class_exercise_a59e53156a35ac23269d30714314017a3}{Exercise::implementation()} virtual method. Make sure not to forget the \hyperlink{class_exercise_aeecc706c36ea2a72a39944ff4a03132b}{Exercise::execute()} call at the end of the constructor of the new class.  




{\ttfamily \#include $<$Exercise.h$>$}

Inheritance diagram for Exercise:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_exercise}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_exercise_a9707094804f79ebc6aeaa597600db682}{Exercise} ()
\item 
virtual \hyperlink{class_exercise_a156f3ee458ddc9918b54e276860a7181}{$\sim$Exercise} ()
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_exercise_aeecc706c36ea2a72a39944ff4a03132b}{execute} ()
\begin{DoxyCompactList}\small\item\em Execute the code of the exercise with a header and a footer. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_exercise_a59e53156a35ac23269d30714314017a3}{implementation} ()=0
\item 
void \hyperlink{class_exercise_aa174e41cc82de45093bde97050a2849e}{printEndOfExercise} ()
\begin{DoxyCompactList}\small\item\em Print a footer for the exercise to easily separate each one. \end{DoxyCompactList}\item 
void \hyperlink{class_exercise_a65232ecae5f93490454e7552dcfe5688}{printExerciseHeader} ()
\begin{DoxyCompactList}\small\item\em Print a header containing the name and some layout to make the traces easily readable. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
std::string \hyperlink{class_exercise_ac88f6df3fab65efd4e0c34db016b57ec}{m\_\-sExerciseName}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Interface pattern for the exercises with some default method implemented. To create an exercise class, inherate from this class and simply overload the \hyperlink{class_exercise_a59e53156a35ac23269d30714314017a3}{Exercise::implementation()} virtual method. Make sure not to forget the \hyperlink{class_exercise_aeecc706c36ea2a72a39944ff4a03132b}{Exercise::execute()} call at the end of the constructor of the new class. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_exercise_a9707094804f79ebc6aeaa597600db682}{
\index{Exercise@{Exercise}!Exercise@{Exercise}}
\index{Exercise@{Exercise}!Exercise@{Exercise}}
\subsubsection[{Exercise}]{\setlength{\rightskip}{0pt plus 5cm}Exercise::Exercise (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_exercise_a9707094804f79ebc6aeaa597600db682}
\hypertarget{class_exercise_a156f3ee458ddc9918b54e276860a7181}{
\index{Exercise@{Exercise}!$\sim$Exercise@{$\sim$Exercise}}
\index{$\sim$Exercise@{$\sim$Exercise}!Exercise@{Exercise}}
\subsubsection[{$\sim$Exercise}]{\setlength{\rightskip}{0pt plus 5cm}Exercise::$\sim$Exercise (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_exercise_a156f3ee458ddc9918b54e276860a7181}


\subsection{Member Function Documentation}
\hypertarget{class_exercise_aeecc706c36ea2a72a39944ff4a03132b}{
\index{Exercise@{Exercise}!execute@{execute}}
\index{execute@{execute}!Exercise@{Exercise}}
\subsubsection[{execute}]{\setlength{\rightskip}{0pt plus 5cm}void Exercise::execute (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_exercise_aeecc706c36ea2a72a39944ff4a03132b}


Execute the code of the exercise with a header and a footer. 

\hypertarget{class_exercise_a59e53156a35ac23269d30714314017a3}{
\index{Exercise@{Exercise}!implementation@{implementation}}
\index{implementation@{implementation}!Exercise@{Exercise}}
\subsubsection[{implementation}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Exercise::implementation (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, pure virtual\mbox{]}}}}
\label{class_exercise_a59e53156a35ac23269d30714314017a3}


Implemented in \hyperlink{class_exercise__2__1__2_acf68987a01d1e34fa5b25ce0a261bace}{Exercise\_\-2\_\-1\_\-2}, \hyperlink{class_exercise__2__1__3_a38edd5ecc025f6f4c951ccba22a562d9}{Exercise\_\-2\_\-1\_\-3}, and \hyperlink{class_exercise__2__1__4_a6d9b9b46632dfe5210984eff43cb2afd}{Exercise\_\-2\_\-1\_\-4}.

\hypertarget{class_exercise_aa174e41cc82de45093bde97050a2849e}{
\index{Exercise@{Exercise}!printEndOfExercise@{printEndOfExercise}}
\index{printEndOfExercise@{printEndOfExercise}!Exercise@{Exercise}}
\subsubsection[{printEndOfExercise}]{\setlength{\rightskip}{0pt plus 5cm}void Exercise::printEndOfExercise (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_exercise_aa174e41cc82de45093bde97050a2849e}


Print a footer for the exercise to easily separate each one. 

\hypertarget{class_exercise_a65232ecae5f93490454e7552dcfe5688}{
\index{Exercise@{Exercise}!printExerciseHeader@{printExerciseHeader}}
\index{printExerciseHeader@{printExerciseHeader}!Exercise@{Exercise}}
\subsubsection[{printExerciseHeader}]{\setlength{\rightskip}{0pt plus 5cm}void Exercise::printExerciseHeader (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_exercise_a65232ecae5f93490454e7552dcfe5688}


Print a header containing the name and some layout to make the traces easily readable. 



\subsection{Member Data Documentation}
\hypertarget{class_exercise_ac88f6df3fab65efd4e0c34db016b57ec}{
\index{Exercise@{Exercise}!m\_\-sExerciseName@{m\_\-sExerciseName}}
\index{m\_\-sExerciseName@{m\_\-sExerciseName}!Exercise@{Exercise}}
\subsubsection[{m\_\-sExerciseName}]{\setlength{\rightskip}{0pt plus 5cm}std::string {\bf Exercise::m\_\-sExerciseName}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_exercise_ac88f6df3fab65efd4e0c34db016b57ec}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/marc/SVN/IntroToAlgo/\hyperlink{_exercise_8h}{Exercise.h}\item 
/home/marc/SVN/IntroToAlgo/\hyperlink{_exercise_8cpp}{Exercise.cpp}\end{DoxyCompactItemize}
